//
//  PUBoard.m
//  PicUploader
//
//  Created by Chen Zhang on 9/13/08.
//  Copyright 2008 overboming. All rights reserved.
//

#import "PUBoard.h"


@implementation PUBoard

- (id)init
{
    [super init];
    boardName = nil;
    return self;
}

- (id)initWithBoardName:(NSString *)bn
{
    [super init];
    boardName = [bn retain];
    return self;
}

- (void)dealloc
{
    [boardName release];
    [super dealloc];
}


- (void)encodeWithCoder:(NSCoder *)coder
{
    [coder encodeObject:boardName forKey:@"boardName"];    
}

- (void)setNilValueForKey:(NSString *)key
{
    if ([key isEqual:@"boardName"]){
        [self setBoardName:@"PIC"];
	}
    [super setNilValueForKey:key];
}


- (id)initWithCoder:(NSCoder *)coder
{
	[super init];
	boardName = [[coder decodeObjectForKey:@"boardName"] retain];
	return self;
}


@synthesize boardName;
@end
